home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume12 / cnews / part07 < prev    next >
Encoding:
Internet Message Format  |  1987-10-21  |  52.1 KB

  1. Subject:  v12i032:  C News alpha release, Part07/14
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: utzoo!henry (Henry Spencer)
  7. Posting-number: Volume 12, Issue 32
  8. Archive-name: cnews/part07
  9.  
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of archive 7 (of 14)."
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. if test -f 'input/newsspool.c' -a "${1}" != "-c" ; then 
  20.   echo shar: Will not clobber existing file \"'input/newsspool.c'\"
  21. else
  22. echo shar: Extracting \"'input/newsspool.c'\" \(4040 characters\)
  23. sed "s/^X//" >'input/newsspool.c' <<'END_OF_FILE'
  24. X/*
  25. X * newsspool - copy incoming news into incoming directory
  26. X *
  27. X * $Log$
  28. X */
  29. X
  30. X#include <stdio.h>
  31. X#include <sys/types.h>
  32. X#include <sys/stat.h>
  33. X#include <string.h>
  34. X#include "news.h"
  35. X#include "newspaths.h"
  36. X
  37. X#ifndef lint
  38. Xstatic char RCSid[] = "$Header$";
  39. X#endif
  40. X
  41. Xint debug = 0;
  42. Xchar *progname;
  43. X
  44. Xextern void error(), exit();
  45. X#ifdef UTZOOERR
  46. Xextern char *mkprogname();
  47. X#else
  48. X#define    mkprogname(a)    (a)
  49. X#endif
  50. X
  51. Xchar buf[BUFSIZ*10];    /* try to get a batch in a few gulps */
  52. X
  53. Xvoid process();
  54. XFILE *outopen();
  55. Xvoid outclose();
  56. Xextern time_t time();
  57. X
  58. X/*
  59. X - main - parse arguments and handle options
  60. X */
  61. Xmain(argc, argv)
  62. Xint argc;
  63. Xchar *argv[];
  64. X{
  65. X    int c;
  66. X    int errflg = 0;
  67. X    FILE *in;
  68. X    struct stat statbuf;
  69. X    extern int optind;
  70. X    extern char *optarg;
  71. X    extern FILE *efopen();
  72. X    void process();
  73. X
  74. X    progname = mkprogname(argv[0]);
  75. X
  76. X    while ((c = getopt(argc, argv, "d")) != EOF)
  77. X        switch (c) {
  78. X        case 'd':    /* Debugging. */
  79. X            debug++;
  80. X            break;
  81. X        case '?':
  82. X        default:
  83. X            errflg++;
  84. X            break;
  85. X        }
  86. X    if (errflg) {
  87. X        fprintf(stderr, "usage: %s [file] ...\n", progname);
  88. X        exit(2);
  89. X    }
  90. X
  91. X    (void) umask(newsumask());
  92. X
  93. X    if (optind >= argc)
  94. X        process(stdin, "stdin");
  95. X    else
  96. X        for (; optind < argc; optind++)
  97. X            if (STREQ(argv[optind], "-"))
  98. X                process(stdin, "-");
  99. X            else {
  100. X                in = efopen(argv[optind], "r");
  101. X                if (fstat(fileno(in), &statbuf) < 0)
  102. X                    error("can't fstat `%s'", argv[optind]);
  103. X                if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
  104. X                    error("`%s' is directory!", argv[optind]);
  105. X                process(in, argv[optind]);
  106. X                (void) fclose(in);
  107. X            }
  108. X    exit(0);
  109. X}
  110. X
  111. X/*
  112. X * process - process input file
  113. X */
  114. Xvoid
  115. Xprocess(in, inname)
  116. XFILE *in;
  117. Xchar *inname;
  118. X{
  119. X    register int count;
  120. X    register int first;
  121. X    FILE *out;
  122. X    register char *p;
  123. X    register int n;
  124. X    char outname[MAXFILE];
  125. X
  126. X    out = outopen(outname);
  127. X
  128. X    /* do the copying */
  129. X    first = 1;
  130. X    while ((count = fread(buf, sizeof(char), sizeof(buf), in)) > 0) {
  131. X        if (first) {
  132. X            n = cunskip(buf, count);
  133. X            p = buf + n;
  134. X            count -= n;
  135. X            first = 0;
  136. X        } else
  137. X            p = buf;
  138. X        n = fwrite(p, sizeof(char), count, out);
  139. X        if (n != count)
  140. X            error("write error in output to `%s'", outname);
  141. X    }
  142. X
  143. X    outclose(out, outname);
  144. X}
  145. X
  146. X/*
  147. X - outopen - acquire an output file
  148. X */
  149. XFILE *
  150. Xoutopen(name)
  151. Xchar *name;            /* not the name, but rather space for it */
  152. X{
  153. X    FILE *f;
  154. X
  155. X    (void) strcpy(name, libfile("incoming/ns.XXXXXX"));
  156. X    mktemp(name);
  157. X    f = fopen(name, "w");
  158. X    if (f == NULL)
  159. X        error("unable to create temporary `%s'", name);
  160. X    if (debug)
  161. X        fprintf(stderr, "output into %s\n", name);
  162. X
  163. X    return(f);
  164. X}
  165. X
  166. X/*
  167. X - outclose - close output file, moving it to the right place
  168. X *
  169. X * Names are based on the current time in hopes of keeping input in order.
  170. X */
  171. Xvoid
  172. Xoutclose(f, tmpname)
  173. XFILE *f;
  174. Xchar *tmpname;
  175. X{
  176. X    char name[MAXFILE];
  177. X    register char *p;
  178. X    time_t now;
  179. X
  180. X    if (fclose(f) == EOF)
  181. X        error("fclose error on file `%s'", tmpname);
  182. X
  183. X    (void) strcpy(name, libfile("incoming/"));
  184. X    p = name + strlen(name);
  185. X
  186. X    for (;;) {
  187. X        now = time((time_t *)NULL);
  188. X        sprintf(p, "%ld", now);
  189. X        if (debug)
  190. X            fprintf(stderr, "trying renaming to %s\n", name);
  191. X        if (link(tmpname, name) >= 0)
  192. X            break;
  193. X        if (debug)
  194. X            fprintf(stderr, "failed\n");
  195. X        sleep(1);
  196. X    }
  197. X    if (debug)
  198. X        fprintf(stderr, "succeeded\n");
  199. X    (void) unlink(tmpname);
  200. X}
  201. X
  202. X/*
  203. X - cunskip - inspect block for silly #! cunbatch header
  204. X */
  205. Xint                /* number of chars at start to skip */
  206. Xcunskip(bufp, count)
  207. Xchar *bufp;
  208. Xint count;
  209. X{
  210. X    static char goop[] = "cunbatch";
  211. X#    define    GOOPLEN    (sizeof(goop)-1)    /* strlen(goop) */
  212. X    register char *p;
  213. X    register int nleft;
  214. X
  215. X    nleft = count;
  216. X    p = bufp;
  217. X
  218. X    if (nleft < 2)
  219. X        return(0);
  220. X    if (*p++ != '#' || *p++ != '!')
  221. X        return(0);
  222. X    nleft -= 2;
  223. X
  224. X    while (nleft > 0 && (*p == ' ' || *p == '\t')) {
  225. X        p++;
  226. X        nleft--;
  227. X    }
  228. X
  229. X    if (nleft < sizeof(goop))    /* NUL on goop covers newline */
  230. X        return(0);
  231. X    if (!STREQN(p, goop, GOOPLEN))
  232. X        return(0);
  233. X    p += GOOPLEN;
  234. X    nleft -= GOOPLEN;
  235. X
  236. X    while (nleft > 0 && (*p == ' ' || *p == '\t')) {
  237. X        p++;
  238. X        nleft--;
  239. X    }
  240. X
  241. X    if (nleft == 0 || *p++ != '\n')
  242. X        return(0);
  243. X
  244. X    return(p - bufp);
  245. X}
  246. X
  247. X/*
  248. X - unprivileged - no-op to keep pathname routines happy
  249. X */
  250. Xvoid
  251. Xunprivileged()
  252. X{
  253. X}
  254. END_OF_FILE
  255. if test 4040 -ne `wc -c <'input/newsspool.c'`; then
  256.     echo shar: \"'input/newsspool.c'\" unpacked with wrong size!
  257. fi
  258. # end of 'input/newsspool.c'
  259. fi
  260. if test -f 'lib.proto/active' -a "${1}" != "-c" ; then 
  261.   echo shar: Will not clobber existing file \"'lib.proto/active'\"
  262. else
  263. echo shar: Extracting \"'lib.proto/active'\" \(4724 characters\)
  264. sed "s/^X//" >'lib.proto/active' <<'END_OF_FILE'
  265. Xcontrol 00000 00000 y
  266. Xjunk 00000 00000 y
  267. Xutstat.general 00000 00000 y
  268. Xutstat.hacknews 00000 00000 y
  269. Xutstat.gripes 00000 00000 y
  270. Xutstat.deadletter 00000 00000 m
  271. Xutstat.test 00000 00000 y
  272. Xutstat.control 00000 00000 y
  273. Xutstat.junk 00000 00000 y
  274. Xto.utstat 00000 00000 y
  275. Xto.utgpu 00000 00000 y
  276. Xto.utzoo 00000 00000 y
  277. Xnews.announce.newusers 00000 00000 m
  278. Xut.general 00000 00000 y
  279. Xut.16k 00000 00000 y
  280. Xut.vlsi 00000 00000 y
  281. Xut.supercomputer 00000 00000 y
  282. Xut.theory 00000 00000 y
  283. Xut.na 00000 00000 y
  284. Xtor.general 00000 00000 y
  285. Xtor.news 00000 00000 y
  286. Xtor.news.stats 00000 00000 y
  287. Xont.general 00000 00000 y
  288. Xont.uucp 00000 00000 y
  289. Xont.micro 00000 00000 y
  290. Xont.jobs 00000 00000 y
  291. Xont.events 00000 00000 y
  292. Xont.singles 00000 00000 y
  293. Xont.test 00000 00000 y
  294. Xont.sf-lovers 00000 00000 y
  295. Xcan.general 00000 00000 y
  296. Xcan.jobs 00000 00000 y
  297. Xcan.ai 00000 00000 y
  298. Xcan.politics 00000 00000 y
  299. Xcan.francais 00000 00000 y
  300. Xnews.announce.important 00000 00000 m
  301. Xnews.announce.conferences 00000 00000 m
  302. Xcomp.sys.sun 00000 00000 m
  303. Xcomp.mail.maps 00000 00000 m
  304. Xcomp.org.usenix 00000 00000 y
  305. Xcomp.sources.unix 00000 00000 m
  306. Xcomp.sources.bugs 00000 00000 y
  307. Xcomp.sources.d 00000 00000 y
  308. Xcomp.sources.wanted 00000 00000 y
  309. Xcomp.sources.misc 00000 00000 m
  310. Xcomp.doc 00000 00000 m
  311. Xcomp.doc.techreports 00000 00000 m
  312. Xcomp.laser-printers 00000 00000 m
  313. Xcomp.unix.wizards 00000 00000 y
  314. Xcomp.protocols.tcp-ip 00000 00000 y
  315. Xcomp.bugs.4bsd 00000 00000 y
  316. Xcomp.bugs.4bsd.ucb-fixes 00000 00000 m
  317. Xcomp.bugs.2bsd 00000 00000 y
  318. Xcomp.bugs.sys5 00000 00000 y
  319. Xcomp.bugs.misc 00000 00000 y
  320. Xcomp.lang.c++ 00000 00000 y
  321. Xcomp.lang.c 00000 00000 y
  322. Xcomp.std.c 00000 00000 m
  323. Xcomp.lang.fortran 00000 00000 y
  324. Xcomp.lang.misc 00000 00000 y
  325. Xcomp.mail.uucp 00000 00000 y
  326. Xcomp.mail.elm 00000 00000 m
  327. Xcomp.mail.headers 00000 00000 y
  328. Xcomp.mail.misc 00000 00000 y
  329. Xcomp.windows.x 00000 00000 y
  330. Xcomp.windows.news 00000 00000 y
  331. Xcomp.windows.misc 00000 00000 y
  332. Xcomp.compilers 00000 00000 m
  333. Xcomp.newprod 00000 00000 m
  334. Xcomp.graphics 00000 00000 y
  335. Xcomp.graphics.digest 00000 00000 m
  336. Xcomp.risks 00000 00000 m
  337. Xcomp.society 00000 00000 m
  338. Xcomp.os.research 00000 00000 m
  339. Xcomp.os.minix 00000 00000 y
  340. Xcomp.os.misc 00000 00000 y
  341. Xcomp.std.unix 00000 00000 m
  342. Xcomp.std.misc 00000 00000 m
  343. Xcomp.text 00000 00000 y
  344. Xcomp.text.desktop 00000 00000 m
  345. Xcomp.arch 00000 00000 y
  346. Xcomp.periphs 00000 00000 y
  347. Xcomp.terminals 00000 00000 y
  348. Xcomp.dcom.lans 00000 00000 y
  349. Xcomp.dcom.modems 00000 00000 y
  350. Xcomp.dcom.telecom 00000 00000 m
  351. Xcomp.lsi 00000 00000 y
  352. Xcomp.ai 00000 00000 y
  353. Xcomp.ai.digest 00000 00000 m
  354. Xcomp.unix 00000 00000 m
  355. Xcomp.unix.questions 00000 00000 y
  356. Xcomp.unix.ultrix 00000 00000 m
  357. Xcomp.cog-eng 00000 00000 y
  358. Xcomp.databases 00000 00000 y
  359. Xcomp.edu 00000 00000 y
  360. Xcomp.emacs 00000 00000 y
  361. Xcomp.sys.ibm.pc 00000 00000 y
  362. Xcomp.hypercube 00000 00000 m
  363. Xcomp.misc 00000 00000 y
  364. Xnews.config 00000 00000 y
  365. Xnews.admin 00000 00000 y
  366. Xnews.sysadmin 00000 00000 y
  367. Xnews.software.b 00000 00000 y
  368. Xnews.software.notes 00000 00000 y
  369. Xnews.stargate 00000 00000 y
  370. Xnews.lists 00000 00000 m
  371. Xnews.groups 00000 00000 y
  372. Xnews.newsites 00000 00000 y
  373. Xnews.misc 00000 00000 y
  374. Xsci.crypt 00000 00000 y
  375. Xsci.math 00000 00000 y
  376. Xsci.math.stat 00000 00000 y
  377. Xsci.math.symbolic 00000 00000 y
  378. Xmisc.jobs.offered 00000 00000 y
  379. Xmisc.jobs.resumes 00000 00000 y
  380. Xmisc.jobs.misc 00000 00000 y
  381. Xlist.can-inet 00000 00000 y
  382. Xlist.dtp 00000 00000 y
  383. Xlist.info-nets 00000 00000 y
  384. Xlist.iso 00000 00000 y
  385. Xlist.macsyma 00000 00000 y
  386. Xlist.mh-users 00000 00000 y
  387. Xlist.mh-workers 00000 00000 y
  388. Xlist.mhs_implementation 00000 00000 y
  389. Xlist.namedroppers 00000 00000 y
  390. Xlist.neuron 00000 00000 y
  391. Xlist.news-makers 00000 00000 y
  392. Xlist.nl-kr 00000 00000 y
  393. Xlist.info-postscript 00000 00000 y
  394. Xlist.security 00000 00000 y
  395. Xlist.slug 00000 00000 y
  396. Xlist.texhax 00000 00000 y
  397. Xlist.unix-sw 00000 00000 y
  398. Xlist.unix-tex 00000 00000 y
  399. Xlist.vision-list 00000 00000 y
  400. Xlist.xpert 00000 00000 y
  401. Xlist.ailist 00000 00000 y
  402. Xlist.sun-spots 00000 00000 y
  403. Xlist.bind 00000 00000 y
  404. Xlist.info-1100 00000 00000 y
  405. Xlist.comm-l 00000 00000 m
  406. Xlist.ibm-nets 00000 00000 m
  407. Xlist.license 00000 00000 m
  408. Xlist.mail-l 00000 00000 m
  409. Xlist.nnmail-l 00000 00000 m
  410. Xlist.rscsmods 00000 00000 m
  411. Xlist.rscsv2-l 00000 00000 m
  412. Xlist.s-comput 00000 00000 m
  413. Xlist.sas-l 00000 00000 m
  414. Xlist.servers 00000 00000 m
  415. Xlist.spssx-l 00000 00000 m
  416. Xlist.std-l 00000 00000 m
  417. Xlist.texmag-l 00000 00000 m
  418. Xlist.trafic-l 00000 00000 m
  419. Xlist.trans-l 00000 00000 m
  420. Xlist.usrdir-l 00000 00000 m
  421. Xlist.x400-l 00000 00000 m
  422. Xlist.future-l 00000 00000 m
  423. Xlist.info-futures 00000 00000 m
  424. Xlist.netnws-l 00000 00000 m
  425. Xlist.netmonth 00000 00000 m
  426. Xlist.pc-token 00000 00000 m
  427. Xlist.domain-l 00000 00000 m
  428. Xlist.big-lan 00000 00000 m
  429. Xlist.ibmtcp-l 00000 00000 m
  430. Xlist.humanist 00000 00000 m
  431. Xcomp.sys.mac 00000 00000 y
  432. Xcomp.sys.mac.digest 00000 00000 y
  433. Xcomp.sources.mac 00000 00000 y
  434. END_OF_FILE
  435. if test 4724 -ne `wc -c <'lib.proto/active'`; then
  436.     echo shar: \"'lib.proto/active'\" unpacked with wrong size!
  437. fi
  438. # end of 'lib.proto/active'
  439. fi
  440. if test -f 'rna/defs.h' -a "${1}" != "-c" ; then 
  441.   echo shar: Will not clobber existing file \"'rna/defs.h'\"
  442. else
  443. echo shar: Extracting \"'rna/defs.h'\" \(4972 characters\)
  444. sed "s/^X//" >'rna/defs.h' <<'END_OF_FILE'
  445. X#include <sys/types.h>
  446. X#include <sys/stat.h>
  447. X#include <sys/dir.h>
  448. X#include <stdio.h>
  449. X#include <ctype.h>
  450. X#include <time.h>
  451. X#ifdef USG
  452. X#include <fcntl.h>
  453. X#endif
  454. X#include <signal.h>
  455. X#include <sgtty.h>
  456. X#include "at.h"
  457. X
  458. X#define NEWSVERSION     "B UNSW 1.1 19 Sep 1984"
  459. X
  460. X/* Things that very well may require local configuration */
  461. X
  462. X#define TIMEZONE    "EST"        /* name of time zone */
  463. X
  464. X#define DFLTSUB "general,general.all"    /* default subscription list    */
  465. X#define    ADMSUB    "general"        /* Mandatory subscription list */
  466. X#define MODGROUPS "mod.all,all.mod,all.announce"    /* Moderated groups */
  467. X#define DFLTGRP    "general"        /* default newsgroup (for postnews) */
  468. X/* #define MANGRPS     1        /* if you have mandatory subscriptions
  469. X                       tailored per-person (uses
  470. X                       getclasses()) */
  471. X/*#define OZ    1*/            /* if on Australian network, used
  472. X                       in readnews to get correct return
  473. X                       address */
  474. X/*#define AUSAM    1*/            /* hashed passwd file, locked files */
  475. X#if AUSAM
  476. X#include <passwd.h>
  477. X#else
  478. X#include <pwd.h>
  479. X#endif
  480. X
  481. X#ifdef vax
  482. X/* #define NETPATH    1        /* if you have path finding program
  483. X                       /bin/netpath */
  484. X#endif
  485. X/*#define UNSWMAIL 1*/            /* if you have UNSW "mail" which
  486. X                       allows "-s subject -i include_file"
  487. X                       arguments */
  488. X#define NETID "utstat"
  489. X#ifndef NETID
  490. X#define NETID "utstat"            /* else define it here */
  491. X#endif
  492. X
  493. X#ifndef NETID
  494. X#include <table.h>            /* UNSW only */
  495. X#endif
  496. X
  497. X/* #define MC "/usr/bin/p"            /* pager */
  498. X#define UUNAME "/usr/bin/uuname"
  499. X#define RNEWS    "exec rnews"        /* rnews for uurec to fork */
  500. X#define POSTNEWS "/usr/bin/inews"
  501. X#define CHOWN    "/etc/chown"        /* pathname of chown command */
  502. X#define SHELL    "/bin/sh"        /* if not bourne shell see postnews.c */
  503. X#define MKDIR    "/bin/mkdir"
  504. X#define MAIL    "/bin/mail"
  505. X#if UNSWMAIL
  506. X#define FASTMAIL    "/bin/mail"
  507. X#else
  508. X#define FASTMAIL    MAIL
  509. X#endif
  510. X
  511. X#define HELP    "/usr/lib/news/help.readnews"        /* Help text */
  512. X#define SEQ    "/usr/lib/news/seq"        /* Next sequence number */
  513. X#define SYS    "/usr/lib/news/sys"        /* System subscription lists */
  514. X#define ACTIVE    "/usr/lib/news/active"        /* Active newsgroups */
  515. X#define HISTORY "/usr/lib/news/history"        /* Current articles */
  516. X
  517. X#define MYDOMAIN "uucp"            /* Local domain */
  518. X#define MYORG    "U. of Toronto Statistics" /* My organization */
  519. X#define NEWSROOT "news"            /* news editor */
  520. X
  521. X/* Things you might want to change */
  522. X
  523. X#define NEWSRC  ".newsrc"        /* name of .newsrc file */
  524. X#define    PAGESIZE 24            /* lines on screen */
  525. X#define ARTICLES "articles"        /* default place to save articles */
  526. X#define NEGCHAR    '!'            /* newsgroup negation character    */
  527. X#define NEGS    "!"            /* ditto (string) */
  528. X#define BADGRPCHARS "/#!"        /* illegal chars in group name */
  529. X#define BUFLEN    256            /* standard buffer size */
  530. X#define ED    "/bin/ed"        /* default, if $EDITOR not set */
  531. X
  532. X/* Things you probably won't want to change */
  533. X
  534. X#define    NGSEPCHAR ','    /* delimit character in news group line        */
  535. X#define NGSEPS    ","    /* ditto */
  536. X#define PSEPS "!"    /* separator in Path: */
  537. X#define PSEPCHAR '!'    /* ditto */
  538. X#define PATHPREF "..!"    /* prefix for addresses worked out from Path: */
  539. X#define TRUE    1
  540. X#define FALSE    0
  541. X
  542. X#ifndef F_SETFD
  543. X#ifdef F_SETFL
  544. X#define F_SETFD F_SETFL        /* SETFL becomes SETFD (close on exec arg
  545. X                   to fcntl) */
  546. X#endif
  547. X#endif
  548. X
  549. Xtypedef enum booltype { false = 0, true } bool;
  550. Xtypedef enum applytype { stop, next, nextgroup, searchgroup } applycom;
  551. Xtypedef applycom (*apcmfunc)();
  552. Xtypedef enum pheadtype { printing, passing, making } pheadcom;
  553. X
  554. X/*
  555. X * header structure
  556. X */
  557. Xtypedef struct header {
  558. X    /* mandatory fields */
  559. X    char    *h_relayversion;
  560. X    char    *h_postversion;
  561. X    char    *h_from;
  562. X    char    *h_date;
  563. X    char    *h_newsgroups;
  564. X    char    *h_subject;
  565. X    char    *h_messageid;
  566. X    char    *h_path;
  567. X    /* optional fields */
  568. X    char    *h_replyto;
  569. X    char    *h_sender;
  570. X    char    *h_followupto;
  571. X    char    *h_datereceived;
  572. X    char    *h_expires;
  573. X    char    *h_references;
  574. X    char    *h_control;
  575. X    char    *h_distribution;
  576. X    char    *h_organisation;
  577. X    char    *h_lines;
  578. X    /* any we don't recognise */
  579. X    char    *h_others;
  580. X} header;
  581. X
  582. X/*
  583. X * internal structure for active file
  584. X */
  585. Xtypedef struct active active;
  586. Xstruct active {
  587. X    char    *a_name;
  588. X    short    a_seq;
  589. X    short    a_low;
  590. X    active    *a_next;
  591. X};
  592. X
  593. X/*
  594. X * internal struct for newsrc file
  595. X */
  596. Xtypedef struct newsrc newsrc;
  597. Xstruct newsrc {
  598. X    char    *n_name;
  599. X    bool    n_subscribe;
  600. X    short    n_last;
  601. X    newsrc    *n_next;
  602. X};
  603. X
  604. Xchar    *strrchr(), *strchr(), *strcat(), *strcpy(), *strpbrk();
  605. Xchar    *itoa(), *convg(), *ngsquash(), *ttoa(), *mgets(), *rconvg();
  606. Xchar    *newstr(), *newstr2(), *newstr3(), *newstr4(), *newstr5(), *catstr();
  607. Xchar    *catstr2(), *bsearch(), *mtempnam(), *newstr6();
  608. Xchar    *getunique(), *getretaddr(), *getsubject();
  609. XFILE    *fopenl(), *fopenf();
  610. Xchar    *memset(), *myalloc(), *myrealloc();
  611. Xlong    time(), atol(), atot();
  612. Xint    strpcmp();
  613. Xactive    *readactive();
  614. Xchar *getenv();
  615. X
  616. X#define NIL(type)    ((type *) 0)
  617. X#define NEW(type)    ((type *) myalloc(sizeof(type)))
  618. X#define CMP(a, b)    (*(a) != *(b) ? *(a) - *(b) : strcmp(a, b))
  619. X#define CMPN(a, b, n)    (*(a) != *(b) ? *(a) - *(b) : strncmp(a, b, n))
  620. X
  621. X/* bw 9/15/84 */
  622. X#define uid_t int
  623. X#define strchr index
  624. X#define strrchr rindex
  625. END_OF_FILE
  626. if test 4972 -ne `wc -c <'rna/defs.h'`; then
  627.     echo shar: \"'rna/defs.h'\" unpacked with wrong size!
  628. fi
  629. # end of 'rna/defs.h'
  630. fi
  631. if test -f 'rna/expire.c' -a "${1}" != "-c" ; then 
  632.   echo shar: Will not clobber existing file \"'rna/expire.c'\"
  633. else
  634. echo shar: Extracting \"'rna/expire.c'\" \(4537 characters\)
  635. sed "s/^X//" >'rna/expire.c' <<'END_OF_FILE'
  636. X/*
  637. X * expire [ -n newsgroups ] [ -d days ] [ -w weeks ]
  638. X *
  639. X *    delete articles that arrived before the given date (now - days|weeks)
  640. X *    or that have expiry dates in the past
  641. X *
  642. X *    Michael Rourke, UNSW, April 1984.
  643. X */
  644. X
  645. X#include "defs.h"
  646. X#include "at.h"
  647. X
  648. Xchar histname[]     = HISTORY;
  649. Xchar all[]         = "all";
  650. X
  651. Xchar *nflag         = all;
  652. Xlong etime         = SECINWEEK *2L;
  653. Xchar *newsdir;
  654. Xuid_t    newsuid;
  655. Xlong now;
  656. X
  657. Xmain(argc, argv)
  658. Xint argc;
  659. Xchar *argv[];
  660. X{
  661. X#if AUSAM
  662. X    struct pwent pe;
  663. X    char sbuf[SSIZ];
  664. X#else
  665. X    struct passwd *pp;
  666. X    struct passwd *getpwnam();
  667. X#endif
  668. X
  669. X    for (argv++, argc--; argc > 0; argc--, argv++) {
  670. X        if (argv[0][0] != '-' && argv[0][2] != '\0')
  671. X            break;
  672. X        switch (argv[0][1]) {
  673. X        case 'n':
  674. X            nflag = argv[1]; 
  675. X            break;
  676. X        case 'd':
  677. X            etime = atoi(argv[1]) * SECINDAY; 
  678. X            break;
  679. X        case 'w':
  680. X            etime = atoi(argv[1]) * SECINWEEK; 
  681. X            break;
  682. X        default:
  683. X            argc = -1; 
  684. X            break;
  685. X        }
  686. X        argv++, argc--;
  687. X    }
  688. X    if (argc != 0 || etime < 0) {
  689. X        fprintf(stderr, "Usage: expire [-n newsgroups] [-d days] [-w weeks]\n");
  690. X        exit(1);
  691. X    }
  692. X    time(&now);
  693. X#if AUSAM
  694. X    pe.pw_strings[LNAME] = NEWSROOT;
  695. X    if (getpwuid(&pe, sbuf, sizeof(sbuf)) == PWERROR)
  696. X        error("Password file error.");
  697. X    newsdir = pe.pw_strings[DIRPATH];
  698. X    newsuid = pe.pw_limits.l_uid;
  699. X#else
  700. X    if ((pp = getpwnam(NEWSROOT)) == NULL)
  701. X        error("Password file error.");
  702. X    newsdir = pp->pw_dir;
  703. X    newsuid = pp->pw_uid;
  704. X#endif
  705. X    umask(022);
  706. X    setgid((int) newsuid);
  707. X    setuid((int) newsuid);
  708. X
  709. X    expire(nflag, now - etime);
  710. X    chklow(readactive());
  711. X    exit(0);
  712. X}
  713. X
  714. X
  715. X/*
  716. X * expire articles in the given groups that have arrived before stime
  717. X */
  718. Xexpire(grps, stime)
  719. Xchar *grps;
  720. Xlong stime;
  721. X{
  722. X    register FILE    *f, *tf, *nf;
  723. X    register int i;
  724. X    register char *s, *name;
  725. X    char buf[BUFSIZ];
  726. X    bool        eflag;
  727. X    long pos, tpos, tim;
  728. X    FILE * tmpfile();
  729. X
  730. X    bool        okgrp();
  731. X
  732. X    f = fopenl(histname);
  733. X    tf = NIL(FILE);
  734. X    while (1) {
  735. X        pos = ftell(f);
  736. X        if (fgets(buf, sizeof(buf), f) == NIL(char))
  737. X            break;
  738. X        if ((s = strchr(buf, '>')) == NIL(char))
  739. X            error("Bad format: %s", histname);
  740. X        s += 2;
  741. X        if (*s == 'E')
  742. X            eflag = true, s++;
  743. X        else
  744. X            eflag = false;
  745. X        tim = atol(s);
  746. X        if ((name = strchr(s, ' ')) == NIL(char))
  747. X            error("Bad format: %s", histname);
  748. X        name++;
  749. X        if (!okgrp(name, grps) || (!eflag && tim > stime || eflag &&
  750. X            tim > now)) {
  751. X            /* don't expire now */
  752. X            if (tf)
  753. X                fputs(buf, tf);
  754. X            continue;
  755. X        }
  756. X        /*
  757. X         * have something to expire
  758. X         */
  759. X        if (!tf) {
  760. X            /*
  761. X              * start saving unexpired history
  762. X             */
  763. X            if ((tf = tmpfile()) == NIL(FILE))
  764. X                error("Can't open tmp file.");
  765. X            tpos = ftell(f);
  766. X            rewind(f);
  767. X            for (i = 0; i < pos; i++)
  768. X                putc(getc(f), tf);
  769. X            fseek(f, tpos, 0);
  770. X        }
  771. X        while (*name && (s = strpbrk(name, " \n"))) {
  772. X            *s = '\0';
  773. X            name = newstr3(newsdir, "/", name);
  774. X            unlink(name);
  775. X            free(name);
  776. X            name = s + 1;
  777. X        }
  778. X    }
  779. X    if (tf) {
  780. X        rewind(tf);
  781. X        nf = fopenf(histname, "w");
  782. X        while ((i = getc(tf)) != EOF)
  783. X            putc(i, nf);
  784. X        fclose(nf);
  785. X        fclose(tf);
  786. X    }
  787. X#if !AUSAM
  788. X    unlock(histname);
  789. X#endif
  790. X    fclose(f);
  791. X}
  792. X
  793. X
  794. X/*
  795. X * check that these groups are ok to expire
  796. X */
  797. Xbool
  798. Xokgrp(names, grp)
  799. Xchar *names, *grp;
  800. X{
  801. X    register char *s, *hash, c;
  802. X    register bool    matched;
  803. X
  804. X    if (grp == all)
  805. X        return true;
  806. X    matched = true;
  807. X    while (matched && *names && (s = strpbrk(names, " \n"))) {
  808. X        c = *s;
  809. X        *s = '\0';
  810. X        if ((hash = strchr(names, '#')) == NIL(char))
  811. X            error("Bad format: %s", histname);
  812. X        *--hash = '\0';        /* delete last '/' */
  813. X
  814. X        rconvg(names);
  815. X        matched = (bool) ngmatch(names, grp);
  816. X        convg(names);
  817. X
  818. X        *hash = '/';
  819. X        *s = c;
  820. X        names = s + 1;
  821. X    }
  822. X    return matched;
  823. X}
  824. X
  825. X
  826. X/*
  827. X * set the "low" values in active file
  828. X */
  829. Xchklow(ap)
  830. Xactive *ap;
  831. X{
  832. X    register char *fname;
  833. X    register int low, i;
  834. X    register FILE    *f;
  835. X    struct direct dbuf;
  836. X
  837. X    for ( ; ap; ap = ap->a_next) {
  838. X        low = ap->a_seq + 1;
  839. X        fname = convg(newstr3(newsdir, "/", ap->a_name));
  840. X        if ((f = fopen(fname, "r")) == NIL(FILE)) {
  841. X            warn("Can't open %s", fname);
  842. X            free(fname);
  843. X            continue;
  844. X        }
  845. X        fseek(f, (long) (sizeof(dbuf) * 2), 0);
  846. X        while (fread((char *) & dbuf, sizeof(dbuf), 1, f) == 1) {
  847. X            if (dbuf.d_ino == 0)
  848. X                continue;
  849. X            if (dbuf.d_name[0] != '#')
  850. X                continue;
  851. X            i = atoi(&dbuf.d_name[1]);
  852. X            if (i > 0 && i < low)
  853. X                low = i;
  854. X        }
  855. X        fclose(f);
  856. X        if (low > ap->a_low)
  857. X            setlow(ap->a_name, low);
  858. X        free(fname);
  859. X    }
  860. X}
  861. X
  862. X
  863. X/* VARARGS1 */
  864. Xerror(s, a0, a1, a2, a3)
  865. Xchar *s;
  866. X{
  867. X    fprintf(stderr, "expire: ");
  868. X    fprintf(stderr, s, a0, a1, a2, a3);
  869. X    fprintf(stderr, "\n");
  870. X    exit(1);
  871. X}
  872. X
  873. X
  874. X/* VARARGS1 */
  875. Xwarn(s, a0, a1, a2, a3)
  876. Xchar *s;
  877. X{
  878. X    fprintf(stderr, "expire: Warning: ");
  879. X    fprintf(stderr, s, a0, a1, a2, a3);
  880. X    fprintf(stderr, "\n");
  881. X}
  882. X
  883. X
  884. END_OF_FILE
  885. if test 4537 -ne `wc -c <'rna/expire.c'`; then
  886.     echo shar: \"'rna/expire.c'\" unpacked with wrong size!
  887. fi
  888. # end of 'rna/expire.c'
  889. fi
  890. if test -f 'rna/notes/README' -a "${1}" != "-c" ; then 
  891.   echo shar: Will not clobber existing file \"'rna/notes/README'\"
  892. else
  893. echo shar: Extracting \"'rna/notes/README'\" \(4667 characters\)
  894. sed "s/^X//" >'rna/notes/README' <<'END_OF_FILE'
  895. XThe files in this distribution are:
  896. X
  897. X    Makefile
  898. X    README
  899. X    active.c
  900. X    at.h
  901. X    defs.h
  902. X    expire.c
  903. X    funcs.c
  904. X    header.c
  905. X    history.c
  906. X    lib
  907. X    lib/bsearch.c
  908. X    lib/memset.c
  909. X    lib/strpbrk.c
  910. X    lib/tmpfile.c
  911. X    lib/tmpnam.c
  912. X    maketime.c
  913. X    man
  914. X    man/postnews.1
  915. X    man/readnews.1
  916. X    man/uurec.8
  917. X    man/uusend.8
  918. X    mtempnam.c
  919. X    news.help
  920. X    newsrc.c
  921. X    postnews.c
  922. X    readnews.c
  923. X    sample.sys
  924. X    uurec.c
  925. X    uusend.c
  926. X
  927. XThis news system is modelled on the USENET news system
  928. Xby Mark Horton (and others).
  929. X
  930. XApart from some minor programs the system has been completely re-written.
  931. XThe aim of re-writing was to produce a system that was:
  932. X    1. smaller
  933. X    2. cleaner
  934. X    3. faster
  935. X    4. was compatible at the site <--> site level with USENET
  936. X    5. had a better user interface ("readnews" and "postnews")
  937. X
  938. XThese goals have been met.
  939. XThe programs "readnews" and "postnews" are 1/3 the previous size, and
  940. Xdoes not require separate I/D space to run on pdp11/70's.
  941. XAlso far fewer processes are needed to use "postnews".
  942. X
  943. XThis system is compatible with USENET at the site <--> site level, provided
  944. Xcommunication is done with Version B format messages (the current 'standard').
  945. XThe messages meet the Standard for the format of ARPA Internet Text messages
  946. X(RFC 822).
  947. X
  948. X"postnews" methods of editing messages is compatible with our local "mail"
  949. Xprogram (also re-written locally).
  950. X
  951. XTo aid someone familiar with USENET to find his/her way around the source:
  952. X    Program changes:
  953. X    "checknews" has become a function of "readnews" (readnews -cC)
  954. X    "postnews" and "inews" are combined into "postnews"
  955. X    "readnews" has the same function (simplified user interface)
  956. X    "expire" has the same function (simplified arguments)
  957. X    "recnews" is not needed
  958. X    "sendnews" has been renamed "uusend" (and simplified)
  959. X    "uurec" has the same function
  960. X    Files:
  961. X    The layout of the news database is the same, except that articles
  962. X    are named #<number> rather than <number>, so that numbers can
  963. X    be a valid newsgroup (like class.6.621).
  964. X
  965. X    "/usr/lib/news/active" has an extra field - the lowest numbered article
  966. X    present in a newsgroup.
  967. X    "/usr/lib/news/history" has a sightly different format.
  968. X    "/usr/lib/news/sys" is compatible, except that the third field
  969. X    is ignored (always expects format B site); colons are allowed in
  970. X    the last field.
  971. X
  972. XTo setup the news system:
  973. X    1. edit the "defs.h" file and make any changes necessary
  974. X       in particular: MYDOMAIN, MYORG and the paths of SEQ, SYS etc.
  975. X       MANGRPS should not be defined without making suitable
  976. X       modifications to getmangrps() in readnews.c
  977. X       UNSWMAIL is set if you have the version of mail from UNSW,
  978. X       in particular it allows arguments "-s subject -i include_file"
  979. X       to specify the subject, and make include_file available to
  980. X       a ".i" command (like postnews).
  981. X       AUSAM should not be set unless you have the hashed passwd file,
  982. X       and locked file facilities of AUSAM.
  983. X    1a. edit "Makefile" for the pathnames of LIBDIR, BINDIR and NETDIR.
  984. X    2. create the account NEWSROOT (defined in defs.h) (this is where
  985. X       the messages are kept).
  986. X    3. Run the makefile. If you don't have the routines found in
  987. X       lib/* (bsearch, memset etc.) these can be compiled and
  988. X       linked in as required.
  989. X    4. Create any groups (using "postnews -c 'newgroup <name>'"),
  990. X       that require immediate local posting, otherwise groups will
  991. X       be created automatically when news is received from other sites.
  992. X       Root and NEWSROOT can also mail to non-existent groups, and
  993. X       will be asked whether or not to create the new group.
  994. X    5. Set up a pseudo user "rnews" to direct received news into
  995. X       "postnews -p" (with uid set to NEWSROOT).
  996. X       How this is done will depend on your network implementation.
  997. X       It may require a deamon emptying a mail box regularly
  998. X       (see rnews.sh in this case).
  999. X       If a mail interface is required, series of messages can be
  1000. X       piped into /usr/lib/news/uurec instead.
  1001. X    6. Set up "/usr/lib/news/sys". See sample.sys for an example.
  1002. X       Each line in the "sys" file specifies:
  1003. X        host name
  1004. X        distribution newsgroups
  1005. X        (empty field (system assumes type B interchange))
  1006. X        the command needed to send the item to the host.
  1007. X       Note the current host must have the first two fields also.
  1008. X       News transmission can be via "mail" or directly as a
  1009. X       network file transfer.
  1010. X    7. Test the system by posting to "to.mysite".
  1011. X    8. Arrange for "expire" to be run periodically (via "cron" or "at").
  1012. X
  1013. XIf you had an existing (old) news system, and wish to transfer the
  1014. Xarticles. The best way to do it is run the command:
  1015. X
  1016. X    find oldnewsdir -type f -a -print ^
  1017. X    while read F
  1018. X    do
  1019. X        postnews -p < $F
  1020. X    done
  1021. X
  1022. XMichael Rourke
  1023. XUniversity of New South Wales, Australia    13 June 1984
  1024. X(decvax!mulga!michaelr:elecvax)
  1025. X(vax135!mulga!michaelr:elecvax)
  1026. END_OF_FILE
  1027. if test 4667 -ne `wc -c <'rna/notes/README'`; then
  1028.     echo shar: \"'rna/notes/README'\" unpacked with wrong size!
  1029. fi
  1030. # end of 'rna/notes/README'
  1031. fi
  1032. if test -f 'rnews/anne.jones' -a "${1}" != "-c" ; then 
  1033.   echo shar: Will not clobber existing file \"'rnews/anne.jones'\"
  1034. else
  1035. echo shar: Extracting \"'rnews/anne.jones'\" \(4716 characters\)
  1036. sed "s/^X//" >'rnews/anne.jones' <<'END_OF_FILE'
  1037. X#! /bin/sh
  1038. X# anne.jones - censor headers
  1039. XPATH=/bin:/usr/bin; export PATH
  1040. XNEWSCTL=${NEWSCTL-/usr/lib/news}; export NEWSCTL
  1041. XNEWSBIN=${NEWSBIN-/usr/lib/newsbin}; export NEWSBIN
  1042. XNEWSARTS=${NEWSARTS-/usr/spool/news}; export NEWSARTS
  1043. X
  1044. X# pass 0 - dredge up defaults
  1045. X#---start mary.brown
  1046. Xif test -r $NEWSCTL/domain; then
  1047. X    mydomain="`tr -d ' \11' <$NEWSCTL/domain | sed 's/^\.//' `"
  1048. Xelse
  1049. X    mydomain="uucp"
  1050. Xfi
  1051. X# badsites="pucc.bitnet!"        # tailor, syntax is "host1!host2!...host3!"
  1052. X# "test -r && cat" is used here instead of just "cat" because pre-v8
  1053. X# cat's are broken and return good status when they can't read their files.
  1054. Xhost=`((test -r $NEWSCTL/whoami && cat $NEWSCTL/whoami) || hostname ||
  1055. X    (test -r /etc/whoami && cat /etc/whoami) ||
  1056. X    uuname -l || uname -n || echo the_unknown_host) 2>/dev/null`.$mydomain
  1057. Xcase "$LOGNAME" in
  1058. X# next line assumes stderr is the user's tty
  1059. X"")    : ${USER=`who am i <&2 | sed -e 's/[     ].*//' -e '/!/s/^.*!//' `} ;;
  1060. X*)    USER=$LOGNAME ;;
  1061. Xesac
  1062. Xcase "$NAME" in
  1063. X"")
  1064. X    if test -s $HOME/.name; then
  1065. X        NAME=`cat $HOME/.name`
  1066. X    else
  1067. X        NAME=`(grep "^$USER:" /etc/passwd || ypmatch "$USER" passwd) |
  1068. X            sed 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:]*\).*$/\1/'`
  1069. X        # for BTL RJE format, add
  1070. X        # | sed -e 's/^[^-]*- *//' -e 's/ *(.*$//'
  1071. X        # otherwise for Berkeley format, use this (courtesy Rayan Zachariassen)
  1072. X        case "$NAME" in
  1073. X        *'&'*)
  1074. X            # generate Capitalised login name
  1075. X            NM=`echo "$USER" | sed -e 's/^\(.\)\(.*\)/\1:\2/'`
  1076. X            NM1=`expr "$NM" : '\(.\):.*' | tr a-z A-Z`
  1077. X            NMR=`expr "$NM" : '.:\(.*\)'`
  1078. X            CAPNM="$NM1$NMR"
  1079. X            # turn & into Capitalised login name
  1080. X            NAME=`echo "$NAME" | sed "s:&:$CAPNM:"`
  1081. X            ;;
  1082. X        esac
  1083. X    fi
  1084. X    ;;
  1085. Xesac
  1086. XREALLYFROM="$USER@$host ($NAME)"
  1087. X
  1088. Xcase "$PASSEDFROM" in
  1089. X"")    FROM="$REALLYFROM" ;;
  1090. X*)                    # inews -f sender; avoid forgery
  1091. X    FROM="$PASSEDFROM"
  1092. X    SENDER="$REALLYFROM"
  1093. X    ;;
  1094. Xesac
  1095. X#---end mary.brown
  1096. Xdefpath="$USER"
  1097. Xdeffrom="$FROM"
  1098. Xdefdate="`set \`date\`; echo $1, $3-$2-\`echo $6 | sed 's/^..//'\` $4 $5`"
  1099. Xdefmsgid="`set \`date\`; echo \<$6$2$3.\`echo $4 | tr -d :\`.$$@$host\>`"
  1100. Xdeforg="`sed 1q $NEWSCTL/organi?ation`"
  1101. X
  1102. Xsed >/tmp/aj$$awk "s/DEFMSGID/$defmsgid/
  1103. Xs/DEFPATH/$defpath/
  1104. Xs/DEFFROM/$deffrom/
  1105. Xs/DEFDATE/$defdate/
  1106. Xs/DEFMSGID/$defmsgid/
  1107. Xs/DEFORG/$deforg/" <<\!
  1108. X# pass 1 - note presence | absence of certain headers
  1109. X
  1110. X# a header keyword: remember it and its value
  1111. X/^[^\t ]*:/ { hdrval[$1] = $0; keyword=$1 }
  1112. X# a continuation: concatenate this line to the value
  1113. X!/^[^\t ]*:/ { hdrval[keyword] = hdrval[keyword] "\n" $0 }
  1114. X
  1115. XEND {
  1116. X    # pass 2 - deduce & omit & emit headers
  1117. X    subjname = "Subject:"
  1118. X    ctlname = "Control:"
  1119. X    ngname = "Newsgroups:"
  1120. X    msgidname = "Message-ID:"
  1121. X    typoname =  "Message-Id:"
  1122. X    pathname = "Path:"
  1123. X    datename = "Date:"
  1124. X    fromname = "From:"
  1125. X    orgname = "Organization:"
  1126. X    distrname = "Distribution:"
  1127. X
  1128. X    # fill in missing headers
  1129. X    if (hdrval[typoname] != "") {    # spelling hack
  1130. X        hdrval[msgidname] = hdrval[typoname]
  1131. X        hdrval[typoname] = ""
  1132. X        # fix spelling: Message-Id: -> Message-ID:
  1133. X        nf = split(hdrval[msgidname], fields);    # bust up
  1134. X        fields[1] = msgidname;        # fix spelling
  1135. X        hdrval[msgidname] = fields[1];    # reassemble...
  1136. X        for (i = 2; i <= nf; i++)
  1137. X            hdrval[msgidname] = hdrval[msgidname] " " fields[i]
  1138. X    }
  1139. X    if (hdrval[msgidname] == "")
  1140. X        hdrval[msgidname] = msgidname " " "DEFMSGID"
  1141. X    if (hdrval[orgname] == "")
  1142. X        hdrval[orgname] = orgname " " "DEFORG"
  1143. X
  1144. X    # replace users headers (if any)
  1145. X    hdrval[pathname] = pathname " " "DEFPATH"
  1146. X    hdrval[fromname] = fromname " " "DEFFROM"
  1147. X    hdrval[datename] = datename " " "DEFDATE"
  1148. X
  1149. X    # snuff some headers
  1150. X    distworld = distrname " world"
  1151. X    if (hdrval[distrname] == distworld)
  1152. X        hdrval[distrname] = ""
  1153. X
  1154. X    # the cmsg hack
  1155. X    if (substr(hdrval[subjname],1,14) == "Subject: cmsg ")
  1156. X        hdrval[ctlname] = ctlname " " substr(hdrval[subjname],15)
  1157. X
  1158. X    # warn if no Newsgroups:
  1159. X    if (hdrval[ngname] == "")
  1160. X        print "no newsgroups header!" | "cat >&2"
  1161. X
  1162. X    # favour Newsgroups: & Control: for benefit of rnews
  1163. X    if (hdrval[ngname] != "") {
  1164. X        print hdrval[ngname]
  1165. X        hdrval[ngname] = ""    # no Newsgroups: to print now
  1166. X    }
  1167. X    if (hdrval[ctlname] != "") {
  1168. X        print hdrval[ctlname]
  1169. X        hdrval[ctlname] = ""    # no Control: to print now
  1170. X    }
  1171. X
  1172. X    # B news kludgery: print Path: before From:
  1173. X    if (hdrval[pathname] != "") {
  1174. X        print hdrval[pathname]
  1175. X        hdrval[pathname] = ""    # no Path: to print now
  1176. X    }
  1177. X    if (hdrval[fromname] != "") {
  1178. X        print hdrval[fromname]
  1179. X        hdrval[fromname] = ""    # no From: to print now
  1180. X    }
  1181. X
  1182. X    # have pity on readers: put Subject: next
  1183. X    if (hdrval[subjname] != "") {
  1184. X        print hdrval[subjname]
  1185. X        hdrval[subjname] = ""    # no Subject: to print now
  1186. X    }
  1187. X
  1188. X    # print misc. headers in random order
  1189. X    for (i in hdrval)
  1190. X        if (hdrval[i] != "")
  1191. X            print hdrval[i]
  1192. X}
  1193. X!
  1194. X
  1195. Xcat $* | tr -d '\1-\7\13\14\16-\37' |    # strip invisible chars, a la B news
  1196. X    awk -f /tmp/aj$$awk
  1197. Xrm -f /tmp/aj$$awk
  1198. END_OF_FILE
  1199. if test 4716 -ne `wc -c <'rnews/anne.jones'`; then
  1200.     echo shar: \"'rnews/anne.jones'\" unpacked with wrong size!
  1201. fi
  1202. # end of 'rnews/anne.jones'
  1203. fi
  1204. if test -f 'rnews/history.c' -a "${1}" != "-c" ; then 
  1205.   echo shar: Will not clobber existing file \"'rnews/history.c'\"
  1206. else
  1207. echo shar: Extracting \"'rnews/history.c'\" \(4899 characters\)
  1208. sed "s/^X//" >'rnews/history.c' <<'END_OF_FILE'
  1209. X/*
  1210. X * history file bashing
  1211. X *
  1212. X * B news pulls a dirty (and undocumented) trick and converts message-id's
  1213. X * to lower case before using them as keys in the dbm file.  For the sake of
  1214. X * the news readers, we do the same, under protest.  Grump.
  1215. X */
  1216. X
  1217. X#include <stdio.h>
  1218. X#include <sys/types.h>
  1219. X#include "news.h"
  1220. X#include "newspaths.h"
  1221. X#include "headers.h"
  1222. X
  1223. X/* give 0 & 2 pretty, SVIDish names */
  1224. X#ifndef SEEK_SET
  1225. X#define SEEK_SET 0
  1226. X#define SEEK_END 2
  1227. X#endif
  1228. X
  1229. Xtypedef struct {
  1230. X    char *dptr;
  1231. X    int dsize;
  1232. X} datum;
  1233. X
  1234. Xstatic FILE *fp = NULL;
  1235. Xstatic char filename[MAXFILE];
  1236. X
  1237. X/* forward decls */
  1238. Xextern datum fetch(), getposhist();
  1239. X
  1240. Xstatic
  1241. Xhistname()
  1242. X{
  1243. X    if (filename[0] == '\0')
  1244. X        (void) strcpy(filename, libfile("history"));
  1245. X}
  1246. X
  1247. Xstatic int
  1248. Xopenhist()
  1249. X{
  1250. X    int status = 0;
  1251. X    static int opened = NO;
  1252. X
  1253. X    histname();
  1254. X    if (fp == NULL)
  1255. X        if ((fp = fopenwclex(filename, "a+")) == NULL)
  1256. X            status |= ST_DROPPED;    /* fopenwclex complained already */
  1257. X    if (opened++ == NO && dbminit(filename) < 0)
  1258. X        status |= ST_DROPPED;    /* dbminit will honk */
  1259. X    return status;
  1260. X}
  1261. X
  1262. Xstatic datum
  1263. Xgetposhist(msgid)        /* return seek offset of history entry */
  1264. Xchar *msgid;
  1265. X{
  1266. X    register char *lcmsgid;
  1267. X    datum msgidkey, offset;
  1268. X
  1269. X    msgidkey.dptr = NULL;
  1270. X    if (openhist()&ST_DROPPED)
  1271. X        return msgidkey;        /* no data base */
  1272. X
  1273. X    /* dirty trick (part 1 of 2): convert copy of msgid to lower case */
  1274. X    lcmsgid = strsave(msgid);
  1275. X    strlower(lcmsgid);
  1276. X
  1277. X    msgidkey.dptr = lcmsgid;
  1278. X    msgidkey.dsize = strlen(lcmsgid) + 1;    /* include NUL */
  1279. X    offset = fetch(msgidkey);    /* look up offset by l.c. msgid */
  1280. X
  1281. X    free(lcmsgid);
  1282. X    return offset;
  1283. X}
  1284. X
  1285. Xint
  1286. Xalreadyseen(msgid)        /* return true if found in the data base */
  1287. Xchar *msgid;
  1288. X{
  1289. X    datum posdatum;
  1290. X
  1291. X    posdatum = getposhist(msgid);
  1292. X    return posdatum.dptr != NULL;
  1293. X}
  1294. X
  1295. Xchar *                /* NULL if no history entry */
  1296. Xgethistory(msgid)        /* return existing history entry, if any */
  1297. Xchar *msgid;
  1298. X{
  1299. X    long pos = 0;
  1300. X    static char histent[MAXLINE+1];
  1301. X    datum posdatum;
  1302. X
  1303. X    histent[0] = '\0';
  1304. X    posdatum = getposhist(msgid);
  1305. X    if (posdatum.dptr != NULL && posdatum.dsize == sizeof pos) {
  1306. X        memcpy((char *)&pos, posdatum.dptr, sizeof pos); /* align */
  1307. X        if (fseek(fp, pos, SEEK_SET) != -1 &&
  1308. X            fgets(histent, sizeof histent, fp) != NULL)
  1309. X            return histent;
  1310. X    }
  1311. X    return NULL;
  1312. X}
  1313. X
  1314. Xchar *
  1315. Xfindfiles(histent)        /* side-effect: trims \n */
  1316. Xchar *histent;
  1317. X{
  1318. X    char *tabp;
  1319. X
  1320. X    trim(histent);
  1321. X    tabp = rindex(histent, '\t');
  1322. X    if (tabp != NULL)
  1323. X        ++tabp;        /* skip to start of files list */
  1324. X    return tabp;
  1325. X}
  1326. X
  1327. Xint
  1328. Xhistory(hdrs)                /* generate history entries */
  1329. Xregister struct headers *hdrs;
  1330. X{
  1331. X    register char *lcmsgid;
  1332. X    int status = 0;
  1333. X    time_t now;
  1334. X    long pos;
  1335. X    char msgid[MAXLINE];            /* Message-ID sans \t & \n */
  1336. X    char expiry[MAXLINE];            /* Expires sans \t & \n */
  1337. X    datum msgidkey, posdatum;
  1338. X
  1339. X    /* strip \n & \t to keep history file format sane */
  1340. X    sanitise(hdrs->h_msgid, msgid, sizeof msgid);
  1341. X    sanitise(hdrs->h_expiry, expiry, sizeof expiry);
  1342. X
  1343. X    /* TODO: is the 3rd parameter needed anymore? */
  1344. X    timestamp(stdout, &now, (char **)NULL);
  1345. X    (void) printf(" got %s", msgid);    /* NB: no newline */
  1346. X
  1347. X    status |= openhist();
  1348. X    if (status&ST_DROPPED)
  1349. X        return status;
  1350. X
  1351. X    /* generate history file entry */
  1352. X    (void) fseek(fp, 0L, SEEK_END);
  1353. X    pos = ftell(fp);            /* get seek ptr for dbm */
  1354. X    /*
  1355. X     * B 2.10.3+ rnews puts out a leading space before received time
  1356. X     * if the article contains an Expires: header; tough.
  1357. X     * C news does this right instead of compatibly.
  1358. X     *
  1359. X     * The second field is really two: time-received and Expires: value,
  1360. X     * separated by a tilde.  This is an attempt at partial compatibility
  1361. X     * with B news, in that C expire can cope with B news history files.
  1362. X     */
  1363. X    (void) fprintf(fp, "%s\t%ld~%s\t%s\n", msgid, now, expiry, hdrs->h_files);
  1364. X    (void) fflush(fp);            /* for crash-proofness */
  1365. X    if (ferror(fp))
  1366. X        status = fulldisk(status|ST_DROPPED, filename);
  1367. X
  1368. X    /* record (msgid, position) in data base */
  1369. X
  1370. X    /* dirty trick (part 2 of 2): convert copy of msgid to lower case */
  1371. X    lcmsgid = strsave(msgid);
  1372. X    strlower(lcmsgid);
  1373. X
  1374. X    msgidkey.dptr = lcmsgid;
  1375. X    msgidkey.dsize = strlen(lcmsgid) + 1;    /* include NUL */
  1376. X    /*
  1377. X     * There is no point to storing pos in network byte order,
  1378. X     * since dbm files are machine-dependent and so can't be shared
  1379. X     * by dissimilar machines anyway.
  1380. X     */
  1381. X    posdatum.dptr = (char *)&pos;
  1382. X    posdatum.dsize = sizeof pos;
  1383. X#ifdef NOSTOREVAL
  1384. X    /* original v7 dbm store() returned no value */
  1385. X    (void) store(msgidkey, posdatum);
  1386. X#else
  1387. X    if (store(msgidkey, posdatum) < 0)    /* store l.c. msgid */
  1388. X        status = fulldisk(status|ST_DROPPED, filename);
  1389. X#endif
  1390. X    free(lcmsgid);
  1391. X    return status;
  1392. X}
  1393. X
  1394. X/* strip \n & \t from dirty into clean, which is no more than cleanlen long */
  1395. Xsanitise(dirty, clean, cleanlen)
  1396. Xchar *dirty;
  1397. Xregister char *clean;
  1398. Xunsigned cleanlen;
  1399. X{
  1400. X    if (dirty == NULL)
  1401. X        (void) strncpy(clean, "", (int)cleanlen);
  1402. X    else
  1403. X        (void) strncpy(clean, dirty, (int)cleanlen);
  1404. X    for (; *clean != '\0'; ++clean)
  1405. X        if (*clean == '\t' || *clean == '\n')
  1406. X            *clean = ' ';
  1407. X}
  1408. END_OF_FILE
  1409. if test 4899 -ne `wc -c <'rnews/history.c'`; then
  1410.     echo shar: \"'rnews/history.c'\" unpacked with wrong size!
  1411. fi
  1412. # end of 'rnews/history.c'
  1413. fi
  1414. if test -f 'rnews/sh/anne.jones' -a "${1}" != "-c" ; then 
  1415.   echo shar: Will not clobber existing file \"'rnews/sh/anne.jones'\"
  1416. else
  1417. echo shar: Extracting \"'rnews/sh/anne.jones'\" \(4716 characters\)
  1418. sed "s/^X//" >'rnews/sh/anne.jones' <<'END_OF_FILE'
  1419. X#! /bin/sh
  1420. X# anne.jones - censor headers
  1421. XPATH=/bin:/usr/bin; export PATH
  1422. XNEWSCTL=${NEWSCTL-/usr/lib/news}; export NEWSCTL
  1423. XNEWSBIN=${NEWSBIN-/usr/lib/newsbin}; export NEWSBIN
  1424. XNEWSARTS=${NEWSARTS-/usr/spool/news}; export NEWSARTS
  1425. X
  1426. X# pass 0 - dredge up defaults
  1427. X#---start mary.brown
  1428. Xif test -r $NEWSCTL/domain; then
  1429. X    mydomain="`tr -d ' \11' <$NEWSCTL/domain | sed 's/^\.//' `"
  1430. Xelse
  1431. X    mydomain="uucp"
  1432. Xfi
  1433. X# badsites="pucc.bitnet!"        # tailor, syntax is "host1!host2!...host3!"
  1434. X# "test -r && cat" is used here instead of just "cat" because pre-v8
  1435. X# cat's are broken and return good status when they can't read their files.
  1436. Xhost=`((test -r $NEWSCTL/whoami && cat $NEWSCTL/whoami) || hostname ||
  1437. X    (test -r /etc/whoami && cat /etc/whoami) ||
  1438. X    uuname -l || uname -n || echo the_unknown_host) 2>/dev/null`.$mydomain
  1439. Xcase "$LOGNAME" in
  1440. X# next line assumes stderr is the user's tty
  1441. X"")    : ${USER=`who am i <&2 | sed -e 's/[     ].*//' -e '/!/s/^.*!//' `} ;;
  1442. X*)    USER=$LOGNAME ;;
  1443. Xesac
  1444. Xcase "$NAME" in
  1445. X"")
  1446. X    if test -s $HOME/.name; then
  1447. X        NAME=`cat $HOME/.name`
  1448. X    else
  1449. X        NAME=`(grep "^$USER:" /etc/passwd || ypmatch "$USER" passwd) |
  1450. X            sed 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:]*\).*$/\1/'`
  1451. X        # for BTL RJE format, add
  1452. X        # | sed -e 's/^[^-]*- *//' -e 's/ *(.*$//'
  1453. X        # otherwise for Berkeley format, use this (courtesy Rayan Zachariassen)
  1454. X        case "$NAME" in
  1455. X        *'&'*)
  1456. X            # generate Capitalised login name
  1457. X            NM=`echo "$USER" | sed -e 's/^\(.\)\(.*\)/\1:\2/'`
  1458. X            NM1=`expr "$NM" : '\(.\):.*' | tr a-z A-Z`
  1459. X            NMR=`expr "$NM" : '.:\(.*\)'`
  1460. X            CAPNM="$NM1$NMR"
  1461. X            # turn & into Capitalised login name
  1462. X            NAME=`echo "$NAME" | sed "s:&:$CAPNM:"`
  1463. X            ;;
  1464. X        esac
  1465. X    fi
  1466. X    ;;
  1467. Xesac
  1468. XREALLYFROM="$USER@$host ($NAME)"
  1469. X
  1470. Xcase "$PASSEDFROM" in
  1471. X"")    FROM="$REALLYFROM" ;;
  1472. X*)                    # inews -f sender; avoid forgery
  1473. X    FROM="$PASSEDFROM"
  1474. X    SENDER="$REALLYFROM"
  1475. X    ;;
  1476. Xesac
  1477. X#---end mary.brown
  1478. Xdefpath="$USER"
  1479. Xdeffrom="$FROM"
  1480. Xdefdate="`set \`date\`; echo $1, $3-$2-\`echo $6 | sed 's/^..//'\` $4 $5`"
  1481. Xdefmsgid="`set \`date\`; echo \<$6$2$3.\`echo $4 | tr -d :\`.$$@$host\>`"
  1482. Xdeforg="`sed 1q $NEWSCTL/organi?ation`"
  1483. X
  1484. Xsed >/tmp/aj$$awk "s/DEFMSGID/$defmsgid/
  1485. Xs/DEFPATH/$defpath/
  1486. Xs/DEFFROM/$deffrom/
  1487. Xs/DEFDATE/$defdate/
  1488. Xs/DEFMSGID/$defmsgid/
  1489. Xs/DEFORG/$deforg/" <<\!
  1490. X# pass 1 - note presence | absence of certain headers
  1491. X
  1492. X# a header keyword: remember it and its value
  1493. X/^[^\t ]*:/ { hdrval[$1] = $0; keyword=$1 }
  1494. X# a continuation: concatenate this line to the value
  1495. X!/^[^\t ]*:/ { hdrval[keyword] = hdrval[keyword] "\n" $0 }
  1496. X
  1497. XEND {
  1498. X    # pass 2 - deduce & omit & emit headers
  1499. X    subjname = "Subject:"
  1500. X    ctlname = "Control:"
  1501. X    ngname = "Newsgroups:"
  1502. X    msgidname = "Message-ID:"
  1503. X    typoname =  "Message-Id:"
  1504. X    pathname = "Path:"
  1505. X    datename = "Date:"
  1506. X    fromname = "From:"
  1507. X    orgname = "Organization:"
  1508. X    distrname = "Distribution:"
  1509. X
  1510. X    # fill in missing headers
  1511. X    if (hdrval[typoname] != "") {    # spelling hack
  1512. X        hdrval[msgidname] = hdrval[typoname]
  1513. X        hdrval[typoname] = ""
  1514. X        # fix spelling: Message-Id: -> Message-ID:
  1515. X        nf = split(hdrval[msgidname], fields);    # bust up
  1516. X        fields[1] = msgidname;        # fix spelling
  1517. X        hdrval[msgidname] = fields[1];    # reassemble...
  1518. X        for (i = 2; i <= nf; i++)
  1519. X            hdrval[msgidname] = hdrval[msgidname] " " fields[i]
  1520. X    }
  1521. X    if (hdrval[msgidname] == "")
  1522. X        hdrval[msgidname] = msgidname " " "DEFMSGID"
  1523. X    if (hdrval[orgname] == "")
  1524. X        hdrval[orgname] = orgname " " "DEFORG"
  1525. X
  1526. X    # replace users headers (if any)
  1527. X    hdrval[pathname] = pathname " " "DEFPATH"
  1528. X    hdrval[fromname] = fromname " " "DEFFROM"
  1529. X    hdrval[datename] = datename " " "DEFDATE"
  1530. X
  1531. X    # snuff some headers
  1532. X    distworld = distrname " world"
  1533. X    if (hdrval[distrname] == distworld)
  1534. X        hdrval[distrname] = ""
  1535. X
  1536. X    # the cmsg hack
  1537. X    if (substr(hdrval[subjname],1,14) == "Subject: cmsg ")
  1538. X        hdrval[ctlname] = ctlname " " substr(hdrval[subjname],15)
  1539. X
  1540. X    # warn if no Newsgroups:
  1541. X    if (hdrval[ngname] == "")
  1542. X        print "no newsgroups header!" | "cat >&2"
  1543. X
  1544. X    # favour Newsgroups: & Control: for benefit of rnews
  1545. X    if (hdrval[ngname] != "") {
  1546. X        print hdrval[ngname]
  1547. X        hdrval[ngname] = ""    # no Newsgroups: to print now
  1548. X    }
  1549. X    if (hdrval[ctlname] != "") {
  1550. X        print hdrval[ctlname]
  1551. X        hdrval[ctlname] = ""    # no Control: to print now
  1552. X    }
  1553. X
  1554. X    # B news kludgery: print Path: before From:
  1555. X    if (hdrval[pathname] != "") {
  1556. X        print hdrval[pathname]
  1557. X        hdrval[pathname] = ""    # no Path: to print now
  1558. X    }
  1559. X    if (hdrval[fromname] != "") {
  1560. X        print hdrval[fromname]
  1561. X        hdrval[fromname] = ""    # no From: to print now
  1562. X    }
  1563. X
  1564. X    # have pity on readers: put Subject: next
  1565. X    if (hdrval[subjname] != "") {
  1566. X        print hdrval[subjname]
  1567. X        hdrval[subjname] = ""    # no Subject: to print now
  1568. X    }
  1569. X
  1570. X    # print misc. headers in random order
  1571. X    for (i in hdrval)
  1572. X        if (hdrval[i] != "")
  1573. X            print hdrval[i]
  1574. X}
  1575. X!
  1576. X
  1577. Xcat $* | tr -d '\1-\7\13\14\16-\37' |    # strip invisible chars, a la B news
  1578. X    awk -f /tmp/aj$$awk
  1579. Xrm -f /tmp/aj$$awk
  1580. END_OF_FILE
  1581. if test 4716 -ne `wc -c <'rnews/sh/anne.jones'`; then
  1582.     echo shar: \"'rnews/sh/anne.jones'\" unpacked with wrong size!
  1583. fi
  1584. # end of 'rnews/sh/anne.jones'
  1585. fi
  1586. if test -f 'rnews/test/demo/batch.small' -a "${1}" != "-c" ; then 
  1587.   echo shar: Will not clobber existing file \"'rnews/test/demo/batch.small'\"
  1588. else
  1589. echo shar: Extracting \"'rnews/test/demo/batch.small'\" \(4218 characters\)
  1590. sed "s/^X//" >'rnews/test/demo/batch.small' <<'END_OF_FILE'
  1591. X#! rnews 633
  1592. XNewsgroups: net.slug,net.wretched,net.general
  1593. XPath: rabbit!alice!npoiv!npois!hou5f!hou5b!hou5c!hou5e!hou5a!hou5d!hogpc!houxe!lime!we13!otuxa!ll1!sb1!burl!mhuxv!mhuxi!mhuxj!mhuxt!eagle!harpo!decvax!decwrl!amd70!rocksvax!bimmler
  1594. XFrom: bimmler@rocksvax.UuCp
  1595. XSubject: Re: Re: RE: re: rE: Orphaned Response
  1596. XMessage-ID: <123@drugs.ca>
  1597. XDate-Received: the epoch
  1598. XRelay-Version: version A; site rti.uucp
  1599. XPosting-Version: version A+; site trt.uucp
  1600. X
  1601. X> *NONE*:*:0:root
  1602. X> daemon:*:1:daemon,uucp
  1603. X> sys:*:2:bin,sys
  1604. X> bin70:*:3:
  1605. X> uucp70:*:4:
  1606. X> general:*:5:adams,al
  1607. X
  1608. XI agree!
  1609. X-- 
  1610. XSluggola Slimebreath, Cretins Unlimited.
  1611. X<insert silly graphics here>
  1612. X#! rnews 1025
  1613. XNewsgroups: net.drugs,net.emacs
  1614. XSubject: Re: Re: RE: re: rE: Re: Re: Orpha - (nf)
  1615. XMessage-ID: <willy.geoff@barek>
  1616. XHideous-Name: UCBVAX.@MIT-MC.@udel-relay.ARPA.chris.umcp-cs@UDEL-Relay
  1617. XDate-Received: yesterday
  1618. XRelay-Version: version A+; site rosen.rich
  1619. XPath: research!ihnp4!ihnp3!ihnp1!packard!topaz!cbosgd!drugvax!root
  1620. X
  1621. X> daemon:*:1:daemon,uucp
  1622. X> sys:*:2:bin,sys
  1623. X> bin70:*:3:
  1624. X> uucp70:*:4:
  1625. X> general:*:5:adams,al
  1626. X
  1627. XYou're all a bunch of fascists!
  1628. X-- 
  1629. XFish Face, Morons Incorporated
  1630. X<insert life story here>
  1631. XUUCP: ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay
  1632. XARPA: @brl.arpa:ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay
  1633. XCSnet: @brl.arpa:ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay%csnet-relay
  1634. XDEC E-net: rhea::@brl.arpa:ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay%csnet-relay
  1635. XCDNnet: rhea::@brl.arpa:ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay%csnet-relay.vision.ubc.cdn
  1636. XBITnet: psuvax1!rhea::@brl.arpa:ucbvax!mit-mc%udel-relay.arpa@ff:umcp-cs::udel-relay%csnet-relay.vision.ubc.cdn
  1637. X#! rnews 993
  1638. XNewsgroups: net.general,comp.unix.lizards,comp.unix.bozos
  1639. XPath: vt100aa!uw-muskrat!lbl-clams!MAILER-DAEMON
  1640. XDate: 4 May 83 00:16:37 VDT (Wed)
  1641. XFrom: lbl-clams!MAILER-DAEMON (Mail Delivery Subsystem)
  1642. XTo: uw-muskrat!vt100aa!yzuxab!nail
  1643. XRelayed-by: somsite.UUCP
  1644. XPast-on-by: another.CCCP
  1645. XMunged-up-by: erewhon.UUCP
  1646. XPosting-version: 2.9E3
  1647. XSubject: Returned mail: Who knows why?
  1648. XMessage-Id: <8305040716.AA21547@LBL-CLAMS.BARFA>
  1649. XReceived: by LBL-CLAMS.BARFA (3.320/3.21)
  1650. X    id AA21547; 4 May 83 00:16:37 VDT (Wed)
  1651. X
  1652. X   ----- Transcript of session follows -----
  1653. Xsparrow@gatech.barfa... Connecting to gatech.tcp...
  1654. Xsparrow@gatech.barfa... Like, who knows, man?
  1655. X
  1656. X   ----- Unsent message follows -----
  1657. XDate: 4 May 83 00:16:37 VDT (Wed)
  1658. XFrom: vt100aa!yzuxab!nail@uw-muskrat.UUCP
  1659. XMessage-Id: <8305040716.AA21545@LBL-CLAMS.BARFA>
  1660. XReceived: by LBL-CLAMS.BARFA (3.320/3.21)
  1661. X    id AA21545; 4 May 83 00:16:37 VDT (Wed)
  1662. XTo: vt100aa!uw-muskrat!lbl-clams!sparrow@gatech.barfa
  1663. X
  1664. XPlease take my name off your mailing list.
  1665. X
  1666. X#! rnews 554
  1667. XNewsgroups: alt.bozos,bozos.unix
  1668. XPath: uw-muskrat!ucbvax!decvax!decwrl!ucbvax!anode!cathode!bozos
  1669. XDate: Tue May  3 21:35:59
  1670. XMessage-Id: <8305040716.AA21555@LBL-CLAMS.BARFA>
  1671. XVia: BRL-UNIX
  1672. XVia: Twi-UNIX@Somehost
  1673. XVia: Twenex-20@Elsewhere
  1674. XVia: Godknows@Where
  1675. XFrom: The UNIX Bozos
  1676. XRealaid-by: Twit.UUCP
  1677. XNonconformant-to: Any RFC's you've ever read.
  1678. XLost-by: MIT-BOZOS
  1679. XFound-by: MIT-OZ
  1680. XMessage-Id: <8305040716.AA21549@MIT-OZ.BARFA>
  1681. XRemailed-to: UW-MUSKRAT@LBL-CLAMS.BARFA
  1682. XEventually-for: your eyes only.
  1683. XSubject: And now for something completely different...
  1684. X
  1685. X#! rnews 463
  1686. XPath: ucbvax!decvax!decwrl!anode!bnode!cnode!slime
  1687. XDate: Wed May  4 12:13:14
  1688. XMessage-Id: <8301829293.AA839282@CNODE.UUCP>
  1689. XVia: CNODE.UUCP
  1690. XVia: BNODE.UUCP
  1691. XVia: Anode.Electron
  1692. XVia: DecWhirl
  1693. XVia: DecHax
  1694. XNewsgroups: newt.toad
  1695. XSubject: Re: And now for something completely different...
  1696. X
  1697. XThe greatest thing since Monty Boa! I loved it. Thank you.
  1698. XWhen can we expect the next installment???
  1699. X
  1700. XNot afraid to sign my real name,
  1701. XThanks (as they say) in advance,
  1702. X
  1703. XHandy Solo
  1704. X#! rnews 471
  1705. XPath: ucbvax!decvax!decwrl!anode!bnode!cnode!demon
  1706. XDate: Wed May  4 12:13:14
  1707. XMessage-Id: <8301829294.AA839282@CNODE.UUCP>
  1708. XVia: CNODE.UUCP
  1709. XVia: BNODE.UUCP
  1710. XVia: Anode.Photon
  1711. XVia: DecWhirl
  1712. XVia: DecHax
  1713. XApparantly-for: /dev/null
  1714. XNewsgroups: newt.toad
  1715. XSubject: Re: And now for something completely different...
  1716. X
  1717. XIt stank. What a waste of my damn long-distance UUCP phone bill.
  1718. XThis sort of dreck belongs in the bit bucket, not on a public
  1719. Xnetwork like plaNET.
  1720. X
  1721. XThe Mad Flamer.
  1722. END_OF_FILE
  1723. if test 4218 -ne `wc -c <'rnews/test/demo/batch.small'`; then
  1724.     echo shar: \"'rnews/test/demo/batch.small'\" unpacked with wrong size!
  1725. fi
  1726. # end of 'rnews/test/demo/batch.small'
  1727. fi
  1728. if test -f 'rnews/test/lib/active' -a "${1}" != "-c" ; then 
  1729.   echo shar: Will not clobber existing file \"'rnews/test/lib/active'\"
  1730. else
  1731. echo shar: Extracting \"'rnews/test/lib/active'\" \(5114 characters\)
  1732. sed "s/^X//" >'rnews/test/lib/active' <<'END_OF_FILE'
  1733. Xgeneral 00268
  1734. Xhacknews 00211
  1735. Xgripes 00021
  1736. Xdeadletter 00002
  1737. Xtest 00091
  1738. Xcontrol 06684
  1739. Xjunk 02296
  1740. Xto.utcs 00035
  1741. Xto.utcsstat 00043
  1742. Xto.utzoo 00017
  1743. Xto.oscvax 00009
  1744. Xto.bnr-vpa 00015
  1745. Xto.utflis 00004
  1746. Xto.lsuc 00024
  1747. Xto.utgumby 00006
  1748. Xto.darwin 00017
  1749. Xto.utcsri 00000
  1750. Xto.utcsscb 00004
  1751. Xto.mnetor 00008
  1752. Xto.ryesone 00016
  1753. Xut.general 00145
  1754. Xut.16k 00012
  1755. Xut.vlsi 00018
  1756. Xut.supercomputer 00114
  1757. Xtor.general 00159
  1758. Xont.general 00248
  1759. Xont.uucp 00209
  1760. Xont.micro 00114
  1761. Xont.jobs 00164
  1762. Xont.events 00576
  1763. Xont.singles 00082
  1764. Xont.test 00080
  1765. Xont.sf-lovers 00059
  1766. Xcan.general 00387
  1767. Xcan.jobs 00083
  1768. Xcan.ai 00079
  1769. Xcan.politics 01070
  1770. Xmod.announce 00005
  1771. Xmod.announce.newusers 00020
  1772. Xmod.conferences 00020
  1773. Xnet.announce 00145
  1774. Xnet.announce.newusers 00339
  1775. Xnet.announce.arpa-internet 00102
  1776. Xmod.os 00005
  1777. Xmod.os.os9 00011
  1778. Xmod.os.unix 00008
  1779. Xmod.techreports 00061
  1780. Xmod.newslists 00426
  1781. Xmod.map 00260
  1782. Xmod.sources 00512
  1783. Xmod.sources.doc 00062
  1784. Xmod.motss 00051
  1785. Xmod.music 00175
  1786. Xmod.movies 00020
  1787. Xnet.general 04393
  1788. Xnet.followup 06795
  1789. Xnet.bugs 00853
  1790. Xnet.bugs.v7 00185
  1791. Xnet.bugs.uucp 00725
  1792. Xnet.bugs.usg 00618
  1793. Xnet.bugs.4bsd 02200
  1794. Xnet.bugs.2bsd 00371
  1795. Xnet.unix-wizards 20463
  1796. Xnet.unix 09127
  1797. Xnet.periphs 01118
  1798. Xnet.dcom 02085
  1799. Xnet.info-terms 01019
  1800. Xnet.emacs 02146
  1801. Xnet.jobs 02592
  1802. Xnet.jobs.d 00051
  1803. Xnet.text 01241
  1804. Xmod.computers.laser-printers 00506
  1805. Xnet.micro.ns32k 00038
  1806. Xmod.computers.68k 00098
  1807. Xnet.micro.68k 01724
  1808. Xnet.micro.pc 09399
  1809. Xnet.micro.hp 00232
  1810. Xmod.computers.pyramid 00050
  1811. Xmod.computers.sun 00034
  1812. Xmod.computers.vax 01917
  1813. Xmod.computers.ridge 00053
  1814. Xmod.computers.sequent 00039
  1815. Xmod.computers.apollo 00285
  1816. Xmod.computers.ibm-pc 00087
  1817. Xnet.micro.att 01482
  1818. Xmod.computers.macintosh 00024
  1819. Xmod.mac 00147
  1820. Xmod.mac.binaries 00020
  1821. Xmod.mac.sources 00007
  1822. Xnet.micro.mac 07201
  1823. Xnet.micro.apple 02923
  1824. Xnet.micro.atari8 00344
  1825. Xnet.micro.atari16 01512
  1826. Xnet.micro.atari 02958
  1827. Xmod.amiga 00026
  1828. Xmod.amiga.sources 00018
  1829. Xmod.amiga.binaries 00002
  1830. Xnet.micro.amiga 04147
  1831. Xnet.micro.cbm 02407
  1832. Xnet.micro.cpm 05545
  1833. Xnet.micro.6809 00916
  1834. Xnet.micro 14940
  1835. Xnet.micro.ti 00211
  1836. Xnet.micro.trs-80 00767
  1837. Xmod.computers.workstations 00232
  1838. Xmod.computers.masscomp 00033
  1839. Xmod.human-nets 00020
  1840. Xmod.comp-soc 00121
  1841. Xnet.lan 01718
  1842. Xmod.protocols.tcp-ip 00647
  1843. Xmod.protocols.kermit 00048
  1844. Xmod.protocols.appletalk 00162
  1845. Xnet.lang 02570
  1846. Xmod.std.c 00149
  1847. Xnet.lang.c++ 00297
  1848. Xnet.lang.c 10065
  1849. Xmod.compilers 00115
  1850. Xmod.std.unix 00252
  1851. Xnet.lang.f77 00580
  1852. Xnet.lang.mod2 00566
  1853. Xnet.lang.prolog 00810
  1854. Xnet.lang.apl 00245
  1855. Xnet.lang.st80 00408
  1856. Xnet.lang.lisp 00973
  1857. Xnet.lang.pascal 00610
  1858. Xnet.lang.ada 01006
  1859. Xnet.lang.forth 00482
  1860. Xmod.std.mumps 00035
  1861. Xmod.test 00016
  1862. Xnet.crypt 00834
  1863. Xnet.sources 05327
  1864. Xnet.sources.bugs 00961
  1865. Xnet.sources.mac 01239
  1866. Xnet.sources.games 00744
  1867. Xnet.sources.d 00392
  1868. Xnet.usenix 00676
  1869. Xnet.decus 00449
  1870. Xnet.rumor 02930
  1871. Xnet.lsi 00175
  1872. Xmod.vlsi 00136
  1873. Xnet.mail 01759
  1874. Xnet.mail.headers 00745
  1875. Xnet.news 04700
  1876. Xnet.news.sa 00352
  1877. Xnet.news.adm 00875
  1878. Xnet.news.stargate 00279
  1879. Xnet.news.b 01288
  1880. Xnet.news.config 00916
  1881. Xnet.news.group 06094
  1882. Xnet.news.newsite 01007
  1883. Xnet.news.notes 00107
  1884. Xmod.ai 00807
  1885. Xnet.ai 03492
  1886. Xnet.arch 03753
  1887. Xnet.database 00364
  1888. Xmod.telecom 00424
  1889. Xnet.rec.nude 00764
  1890. Xnet.net-people 01190
  1891. Xnet.singles 14892
  1892. Xnet.social 01226
  1893. Xnet.analog 00978
  1894. Xnet.astro 01968
  1895. Xnet.astro.expert 00274
  1896. Xnet.music.synth 01470
  1897. Xmod.music.love-hounds 00000
  1898. Xmod.music.gaffa 00013
  1899. Xnet.auto 11794
  1900. Xnet.auto.tech 01379
  1901. Xnet.aviation 03288
  1902. Xnet.bio 00632
  1903. Xnet.books 03894
  1904. Xnet.cog-eng 00792
  1905. Xnet.columbia 02821
  1906. Xnet.college 01701
  1907. Xnet.comics 03998
  1908. Xmod.recipes 00243
  1909. Xnet.cooks 06818
  1910. Xnet.wines 00754
  1911. Xmod.newprod 00051
  1912. Xnet.consumers 05937
  1913. Xnet.consumers.house 00353
  1914. Xnet.cse 00876
  1915. Xnet.cycle 01863
  1916. Xnet.eunice 00266
  1917. Xnet.games 02947
  1918. Xnet.games.go 00319
  1919. Xnet.games.emp 00519
  1920. Xnet.games.frp 03310
  1921. Xnet.games.rogue 03176
  1922. Xnet.games.hack 02251
  1923. Xnet.games.trivia 02536
  1924. Xnet.games.pbm 00677
  1925. Xnet.games.video 00645
  1926. Xnet.games.chess 00436
  1927. Xnet.games.board 00302
  1928. Xnet.puzzle 01929
  1929. Xnet.garden 01077
  1930. Xmod.graphics 00030
  1931. Xnet.graphics 01811
  1932. Xnet.ham-radio 04272
  1933. Xnet.ham-radio.packet 00294
  1934. Xnet.internat 00180
  1935. Xnet.invest 01626
  1936. Xnet.jokes 19972
  1937. Xnet.jokes.d 01799
  1938. Xnet.kids 03443
  1939. Xmod.legal 00193
  1940. Xnet.legal 04428
  1941. Xmod.mag 00003
  1942. Xmod.mag.otherrealms 00016
  1943. Xnet.mag 00277
  1944. Xnet.sci 01463
  1945. Xnet.math 03395
  1946. Xnet.math.stat 00282
  1947. Xnet.math.symbolic 00152
  1948. Xnet.med 04313
  1949. Xnet.misc 09685
  1950. Xnet.motss 03609
  1951. Xnet.nlang 04701
  1952. Xnet.nlang.celts 00328
  1953. Xnet.nlang.greek 00286
  1954. Xnet.nlang.india 01715
  1955. Xnet.nlang.africa 00227
  1956. Xnet.pets 02425
  1957. Xnet.physics 04690
  1958. Xnet.poems 01200
  1959. Xmod.politics.arms-d 00220
  1960. Xmod.politics 00105
  1961. Xnet.politics.terror 00008
  1962. Xmod.risks 00108
  1963. Xnet.railroad 01019
  1964. Xnet.bicycle 02765
  1965. Xmod.rec.guns 00171
  1966. Xmod.psi 00008
  1967. Xmod.philosophy 00000
  1968. Xmod.philosophy.tech 00000
  1969. Xnet.rec 00468
  1970. Xnet.rec.birds 00383
  1971. Xnet.rec.bridge 00553
  1972. Xnet.rec.photo 02250
  1973. Xnet.rec.scuba 00335
  1974. Xnet.rec.skydive 00365
  1975. Xnet.rec.ski 00745
  1976. Xnet.rec.boat 00487
  1977. Xnet.rec.wood 00513
  1978. Xnet.research 00524
  1979. Xnet.roots 00262
  1980. Xnet.sport 00952
  1981. Xnet.sport.baseball 03241
  1982. Xnet.sport.hockey 00984
  1983. Xnet.sport.football 01735
  1984. Xnet.sport.hoops 01390
  1985. Xnet.suicide 01014
  1986. Xnet.space 06815
  1987. Xnet.startrek 06255
  1988. Xnet.taxes 01189
  1989. Xnet.travel 02825
  1990. Xnet.tv 05426
  1991. Xnet.tv.soaps 01025
  1992. Xnet.tv.drwho 02704
  1993. Xnet.veg 00891
  1994. Xnet.video 02951
  1995. Xnet.wanted.sources 02628
  1996. Xnet.wanted 09291
  1997. Xna.forsale 00644
  1998. Xnet.wobegon 00557
  1999. Xnet.test 02560
  2000. Xtalk.religion 00000
  2001. END_OF_FILE
  2002. if test 5114 -ne `wc -c <'rnews/test/lib/active'`; then
  2003.     echo shar: \"'rnews/test/lib/active'\" unpacked with wrong size!
  2004. fi
  2005. # end of 'rnews/test/lib/active'
  2006. fi
  2007. echo shar: End of archive 7 \(of 14\).
  2008. ##  End of shell archive.
  2009. exit 0
  2010.